<div>
  <div class="tree-item" (click)="toggleRootDir()">
      <div [ngClass]="[apiService.projectDirOpen?'expanded':'noexpanded']"></div>
    {{ apiService.projectDir }}
  </div>
  <div class="tree-root-sub" [class.show]="apiService.projectDirOpen">
    <div *ngFor="let file of apiService.files;let i = index;">
      <!--目录-->
      <tree-dir *ngIf="file.type=='dir'" 
        [title]="file.fullPath"
        [dirName]="file.name" 
        [expanded]="file.expanded"
        [child]="file.child" 
        (fileSelect)="select($event)"
        (dblFileSelect)="dblSelect($event)"
        [indent]="1" 
        [paths]="[]" 
        [index]="i" 
        [pathsIndexs]="[]">
      </tree-dir>
      <!--文件-->
      <tree-file 
        *ngIf="file.type=='file'" 
        [fileName]="file.name"
        [title]="file.fullPath"
        [indent]="1" 
        (dblFileSelect)="dblSelect($event)"
        (fileSelect)="select($event)" ></tree-file>
    </div>
  </div>  
</div>
